// pages/myTickets/myTickets.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    selectList: [{
      id: 0,
      name: '全部'
    }, {
      id: 2,
      name: '拼团中'
    }, {
      id: 3,
      name: '待使用'
    }, {
      id: 4,
      name: '已退票'
    }, {
      id: 1,
      name: '已完成'
    }],
    selectTypeName: '全部',
    fishTicketList: [{
      id:1,
      status:'拼团中',
        session: '06.24奥琳白天偷驴VIP',
        name: '北京奥琳垂钓俱乐部',
        price: '480',
        time: '2024-06-24 定时5小时',
        num: '1',
        playingMethod: '正钓',
        group_num: '2',
        group_people: [1, 2],
        total_group_num: '3',
        realityPrice: '360',
      },
      {
        id:2,
        status:'未使用',
        session: '06.24奥琳白天偷驴VIP',
        name: '北京奥琳垂钓俱乐部',
        price: '480',
        time: '2024-06-24 定时5小时',
        num: '1',
        playingMethod: '正钓',
        group_num: '2',
        group_people: [1, 2],
        total_group_num: '3',
        realityPrice: '360',
      },
      {
        id:3,
        status:'已退票',
        session: '06.24奥琳白天偷驴VIP',
        name: '北京奥琳垂钓俱乐部',
        price: '480',
        time: '2024-06-24 定时5小时',
        num: '1',
        playingMethod: '正钓',
        group_num: '2',
        group_people: [1, 2],
        total_group_num: '3',
        realityPrice: '360',
      }
    ]
  },
  clickTypeName(e) {
    console.log(e);
    let typeName = e.currentTarget.dataset.typename
    this.setData({
      selectTypeName: typeName
    })
  },
  //订单详情
  toOrderDetail(e){
    let id=e.currentTarget.dataset.name
    wx.navigateTo({
      url: `/pages/orderDetailTickets/orderDetailTickets?id=${id}`,
    })
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
    let selectTypeName = '全部'
    switch (options.id) {
      case '0':
        selectTypeName = '全部'
        break;
      case '2':
        selectTypeName = '拼团中'
        break;
      case '3':
        selectTypeName = '待使用'
        break;
      default:
        selectTypeName = '已退票'
        break;
    }
    this.setData({
      selectTypeName: selectTypeName
    })
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {

  }
})